package vars

import (
	"gitee.com/csingo/cDB"
	"gitee.com/csingo/cHelper"
)

var DatabaseConfig = &cDB.DatabaseConf{
	MysqlConnections: map[string]*cDB.DatabaseConf_MySql{
		"default": {
			Driver:    cDB.DB_DRIVER_MYSQL,
			Host:      cHelper.EnvToString("DB_HOST", "43.131.242.134"),
			Port:      cHelper.EnvToInt("DB_PORT", 3306),
			Database:  cHelper.EnvToString("DB_NAME", "satis"),
			Username:  cHelper.EnvToString("DB_USERNAME", "root"),
			Password:  cHelper.EnvToString("DB_PASSWORD", "123456"),
			Charset:   "utf8mb4",
			Collation: "utf8mb4_general_ci",
			Prefix:    "",
			Debug:     false,
			Pool: &cDB.DatabaseConf_MySql_Pool{
				MaxIdleConnections: 100,
				MaxConnections:     200,
				ConnectTimeout:     10,
				MaxIdleTime:        10,
			},
			HealthCheck: nil,
		},
	},
}
